﻿@using Sprint1.Models

@model IEnumerable<AnswerPoll>

@{
    ViewBag.Title = "Poll Results";
}
<table border="1" style="text-align:center">
    <tr>
        <td colspan="2">
            <h2>Q : @ViewBag.QuestionText</h2>
        </td>
    </tr>
    @foreach (var answer in @Model)
    {
        <tr>
            <td>
                @Html.Label(answer.Text)
            </td>
            <td>
                ( @Html.Label(answer.Vote + " %") )
            </td>
        </tr>
    }
    <tr>
        <td colspan="2">

            @Html.ActionLink("Back to Question", "Details", new { questionId = Model.ElementAt(0).QuestionId })

        </td>
    </tr>
</table>
